home *** CD-ROM | disk | FTP | other *** search
- Path: uunet!cs.utexas.edu!usc!brutus.cs.uiuc.edu!lll-winken!sun-barr!newstop!sun!guinness.ias.edu
- From: vojta@guinness.ias.edu (Paul A Vojta)
- Newsgroups: comp.sources.x
- Subject: REPOST: v06i049: xdvi, Patch8
- Message-ID: <133464@sun.Eng.Sun.COM>
- Date: 26 Mar 90 19:52:47 GMT
- Sender: news@sun.Eng.Sun.COM
- Lines: 1811
- Approved: argv@sun.com
-
- [ Moderator's Note:
- The previous patch sent out was incorrect. A later submission
- obsoleted the previous patch altho there are few changes.
- Please use *THIS* file, not the previous one, as Patch #8.
- For some reason, I have been unable to cancel the previous
- article. If someone has a "sneaky" way to do that, please advise.
- ]
-
- Submitted-by: vojta@guinness.ias.edu (Paul A Vojta)
- Posting-number: Volume 6, Issue 49
- Archive-name: xdvi/patch8
- Patch-To: xdvi: Volume 3, Issues 37-39
- Patch-To: Volume 4, Issue 44 (xdvi, Patch4)
- Patch-To: Volume 4, Issue 96 (xdvi, dvi previewer, Patch5)
- Patch-To: Volume 5, Issue 35 (xdvi, dvi previewer, patch 6, part 1/2)
- Patch-To: Volume 5, Issue 36 (xdvi, dvi previewer, patch 6, part 2/2)
- Patch-To: Volume 6, Issue 5 (xdvi, Patch7)
-
- Here is patch level 8 for xdvi. It can now be compiled under VMS (many
- thanks to Scott.Allendorf@CERES.Physics.UIowa.Edu for assistance)
- and it is now compatible with X11R4.
-
- Plus the usual round of bug fixes; for these I owe thanks to:
- casey@gauss.llnl.gov (Casey Leedom)
- David Burgess <dhb%maths.qmw.ac.uk@NSFNET-RELAY.AC.UK>
- and Peter Lamb (iis!prl)
-
- IMPORTANT NOTE: at this stage you should do the following:
- IMPORTANT NOTE: mv xdvi.man.sed xdvi_man.sed
- IMPORTANT NOTE: This is necessary for VMS compatibility.
- -- cut here --
- diff -cr old/Imakefile new/Imakefile
- *** old/Imakefile Sun Mar 25 21:21:31 1990
- --- new/Imakefile Fri Mar 16 20:59:09 1990
- ***************
- *** 7,13 ****
- FONTFORMATS_C=gf.c pk.c pxl.c
- FONTFORMATS_O=gf.o pk.o pxl.o
-
- ! LOCAL_LIBRARIES=$(XAWLIB) $(XMULIB) $(XTOOLLIB) $(XLIB) -lm
- SRCS=xdvi.c dvi_init.c dvi_draw.c $(FONTFORMATS_C) pxl_open.c tpic.c
- OBJS=xdvi.o dvi_init.o dvi_draw.o $(FONTFORMATS_O) pxl_open.o tpic.o
-
- --- 7,16 ----
- FONTFORMATS_C=gf.c pk.c pxl.c
- FONTFORMATS_O=gf.o pk.o pxl.o
-
- ! DEPLIBS=XawClientDepLibs
- ! LOCAL_LIBRARIES=XawClientLibs
- ! MATHLIB=-lm
- ! SYS_LIBRARIES=$(MATHLIB)
- SRCS=xdvi.c dvi_init.c dvi_draw.c $(FONTFORMATS_C) pxl_open.c tpic.c
- OBJS=xdvi.o dvi_init.o dvi_draw.o $(FONTFORMATS_O) pxl_open.o tpic.o
-
- ***************
- *** 16,26 ****
- pxl_open.o:
- $(CC) -c $(CFLAGS) $(FONTDEFINES) pxl_open.c
-
- ! xdvi.man: xdvi.man.sed
- chmod u+x mksedscript
- mksedscript $(DEFAULT_FONT_PATH) $(DEFAULT_FONT_SIZES) $(DEFINES) \
- > sedscript
- ! sed -f sedscript < xdvi.man.sed > xdvi.man
-
- clean::
- $(RM) sedscript xdvi.man xdvi10.man.s
- --- 19,29 ----
- pxl_open.o:
- $(CC) -c $(CFLAGS) $(FONTDEFINES) pxl_open.c
-
- ! xdvi.man: xdvi_man.sed
- chmod u+x mksedscript
- mksedscript $(DEFAULT_FONT_PATH) $(DEFAULT_FONT_SIZES) $(DEFINES) \
- > sedscript
- ! sed -f sedscript < xdvi_man.sed > xdvi.man
-
- clean::
- $(RM) sedscript xdvi.man xdvi10.man.s
- diff -cr old/MAKE_VMS.COM new/MAKE_VMS.COM
- *** old/MAKE_VMS.COM Sun Mar 25 21:22:19 1990
- --- new/MAKE_VMS.COM Sun Mar 11 21:54:42 1990
- ***************
- *** 0 ****
- --- 1,14 ----
- + $ DEFINE X11 DECW$INCLUDE
- + $ DEFINE SYS SYS$LIBRARY
- + $ CC /DEFINE = (BMLONG, NOTOOL) DVI_INIT
- + $ CC /DEFINE = (BMLONG, NOTOOL) DVI_DRAW
- + $ CC /DEFINE = (BMLONG, NOTOOL) GF
- + $ CC /DEFINE = (BMLONG, NOTOOL) PK
- + $ CC /DEFINE = (BMLONG, NOTOOL) PXL
- + $ CC /DEFINE = (BMLONG, NOTOOL, -
- + "DEFAULT_FONT_PATH=""TEX$FONTS""", -
- + "DEFAULT_FONT_SIZES=""300/328.6/360/432/518.4/622/746.4""") PXL_OPEN
- + $ CC /DEFINE = (BMLONG, NOTOOL) TPIC
- + $ CC /DEFINE = (BMLONG, NOTOOL) XDVI
- + $ LINK XDVI, DVI_INIT, DVI_DRAW, GF, PK, PXL, PXL_OPEN, TPIC, VMS_C.OPT /OPTION
- + $ EXIT
- diff -cr old/Makefile new/Makefile
- *** old/Makefile Sun Mar 25 21:21:32 1990
- --- new/Makefile Sun Mar 25 21:23:52 1990
- ***************
- *** 7,29 ****
- DEFAULT_FONT_PATH=/usr/local/tex/fonts
- DEFAULT_FONT_SIZES=300:328.6:360:432:518.4:622:746.4
- DEFINES=-DMSBITFIRST \
- ! -DBMSHORT
- FONTDEFINES=-DDEFAULT_FONT_PATH=\"$(DEFAULT_FONT_PATH)\" \
- -DDEFAULT_FONT_SIZES=\"$(DEFAULT_FONT_SIZES)\"
- FONTFORMATS_C=gf.c pk.c pxl.c
- FONTFORMATS_O=gf.o pk.o pxl.o
- LIBDIR=/usr/custom/x11/lib
- ! #LIBDIR=/tuna_a/x11r3/lib
- INCDIR=/usr/include
- ! #INCDIR=/tuna_a/x11r3/include
- XMULIB=
- #XMULIB=-lXmu
- DESTDIR=/usr/local/x11
- BINDIR=$(DESTDIR)/bin
- MANDIR=$(DESTDIR)/man
- INCLUDES=-I$(INCDIR)
- CFLAGS=-O $(INCLUDES) $(DEFINES)
- ! LIBS=-L$(LIBDIR) -lXaw $(XMULIB) -lXt -lX11 -lm
- SRCS=xdvi.c dvi_init.c dvi_draw.c $(FONTFORMATS_C) pxl_open.c tpic.c
- OBJS=xdvi.o dvi_init.o dvi_draw.o $(FONTFORMATS_O) pxl_open.o tpic.o
- CC=/tuna_a/gnu/bin/gcc
- --- 7,30 ----
- DEFAULT_FONT_PATH=/usr/local/tex/fonts
- DEFAULT_FONT_SIZES=300:328.6:360:432:518.4:622:746.4
- DEFINES=-DMSBITFIRST \
- ! -DBMSHORT -DBUTTONS
- FONTDEFINES=-DDEFAULT_FONT_PATH=\"$(DEFAULT_FONT_PATH)\" \
- -DDEFAULT_FONT_SIZES=\"$(DEFAULT_FONT_SIZES)\"
- FONTFORMATS_C=gf.c pk.c pxl.c
- FONTFORMATS_O=gf.o pk.o pxl.o
- LIBDIR=/usr/custom/x11/lib
- ! #LIBDIR=/tuna_a/x11r4/lib
- INCDIR=/usr/include
- ! #INCDIR=/tuna_a/x11r4/include
- XMULIB=
- #XMULIB=-lXmu
- + EXTENSIONLIB=-lXext
- DESTDIR=/usr/local/x11
- BINDIR=$(DESTDIR)/bin
- MANDIR=$(DESTDIR)/man
- INCLUDES=-I$(INCDIR)
- CFLAGS=-O $(INCLUDES) $(DEFINES)
- ! LIBS=-L$(LIBDIR) -lXaw $(XMULIB) -lXt $(EXTENSIONLIB) -lX11 -lm
- SRCS=xdvi.c dvi_init.c dvi_draw.c $(FONTFORMATS_C) pxl_open.c tpic.c
- OBJS=xdvi.o dvi_init.o dvi_draw.o $(FONTFORMATS_O) pxl_open.o tpic.o
- CC=/tuna_a/gnu/bin/gcc
- ***************
- *** 48,58 ****
- pxl_open.o:
- $(CC) -c $(CFLAGS) $(FONTDEFINES) pxl_open.c
-
- ! xdvi.man: xdvi.man.sed
- chmod u+x mksedscript
- mksedscript $(DEFAULT_FONT_PATH) $(DEFAULT_FONT_SIZES) $(DEFINES) \
- > sedscript
- ! sed -f sedscript < xdvi.man.sed > xdvi.man
-
- install: xdvi xdvi.man
- install -c -s -m 755 xdvi $(BINDIR)
- --- 49,59 ----
- pxl_open.o:
- $(CC) -c $(CFLAGS) $(FONTDEFINES) pxl_open.c
-
- ! xdvi.man: xdvi_man.sed
- chmod u+x mksedscript
- mksedscript $(DEFAULT_FONT_PATH) $(DEFAULT_FONT_SIZES) $(DEFINES) \
- > sedscript
- ! sed -f sedscript < xdvi_man.sed > xdvi.man
-
- install: xdvi xdvi.man
- install -c -s -m 755 xdvi $(BINDIR)
- diff -cr old/Makefile_10 new/Makefile_10
- *** old/Makefile_10 Sun Mar 25 21:21:33 1990
- --- new/Makefile_10 Sun Mar 25 21:20:08 1990
- ***************
- *** 41,51 ****
- pxl_open.o:
- $(CC) -c $(CFLAGS) $(FONTDEFINES) pxl_open.c
-
- ! xdvi.man: xdvi.man.sed
- chmod u+x mksedscript
- mksedscript $(DEFAULT_FONT_PATH) $(DEFAULT_FONT_SIZES) $(DEFINES) \
- > sedscript
- ! sed -f sedscript < xdvi.man.sed > xdvi.man
-
- install: xdvi xdvi.man
- install -c -s -m 755 xdvi $(BINDIR)
- --- 41,51 ----
- pxl_open.o:
- $(CC) -c $(CFLAGS) $(FONTDEFINES) pxl_open.c
-
- ! xdvi.man: xdvi_man.sed
- chmod u+x mksedscript
- mksedscript $(DEFAULT_FONT_PATH) $(DEFAULT_FONT_SIZES) $(DEFINES) \
- > sedscript
- ! sed -f sedscript < xdvi_man.sed > xdvi.man
-
- install: xdvi xdvi.man
- install -c -s -m 755 xdvi $(BINDIR)
- diff -cr old/README new/README
- *** old/README Sun Mar 25 21:21:34 1990
- --- new/README Tue Mar 13 22:36:46 1990
- ***************
- *** 37,42 ****
- --- 37,43 ----
- you use for storing fonts.
- SYSV (dvi_init pxl_open xdvi.c) Set for System V
- compilation.
- + VMS Set for VMS compilation.
- MSBITFIRST (X11 only; xdvi.c dvi_draw.c gf.c pk.c pxl.c) Store
- bitmaps internally with the most significant bit at
- the left. For performance reasons, it would be best
- ***************
- *** 174,178 ****
- --- 175,181 ----
- 20. Added a yet more robust font finding algorithm.
- -- Patchlevel 7: --
- 21. Replaced -pagewidth and -pageheight options with -paper.
- + -- Patchlevel 8: --
- + 22. Added compatibility for X11R4 and VMS. Fixed up alignment of rules.
-
- Paul Vojta, vojta@math.berkeley.edu
- diff -cr old/VMS_C.OPT new/VMS_C.OPT
- *** old/VMS_C.OPT Sun Mar 25 21:22:38 1990
- --- new/VMS_C.OPT Sun Mar 11 21:54:51 1990
- ***************
- *** 0 ****
- --- 1,2 ----
- + sys$share:decw$xlibshr/share
- + sys$share:vaxcrtl/share
- diff -cr old/dvi_draw.c new/dvi_draw.c
- *** old/dvi_draw.c Sun Mar 25 21:21:37 1990
- --- new/dvi_draw.c Fri Mar 16 21:31:43 1990
- ***************
- *** 12,20 ****
- --- 12,22 ----
- * --Paul Vojta, UC Berkeley.
- * 2/1989 Added tpic support --Jeffrey Lee, U of Toronto
- * 4/1989 Modified for System V by Donald Richardson, Clarkson Univ.
- + * 3/1990 Added VMS support --Scott Allendorf, U of Iowa
- *
- * Compilation options:
- * SYSV compile for System V
- + * VMS compile for VMS
- * X10 compile for X10
- * NOTOOL compile without toolkit (X11 only)
- * BUTTONS compile with buttons on the side of the window (needs toolkit)
- ***************
- *** 30,40 ****
- #include "xdvi.h"
- #include "dvi.h"
-
- ! #define X_PAGE_OFFSET ROUNDUP(pixels_per_inch, shrink_factor)
- ! #define Y_PAGE_OFFSET ROUNDUP(pixels_per_inch, shrink_factor)
-
- struct frame *stack;
- ! int stackp;
-
- #ifndef BMLONG
- #ifndef BMSHORT
- --- 32,47 ----
- #include "xdvi.h"
- #include "dvi.h"
-
- ! /*
- ! * Explanation of the following constant:
- ! * pixels_per_inch << 16: one inch margin
- ! * shrink_factor << 16: one pixel page border
- ! * shrink_factor << 15: rounding for pixel_conv
- ! */
- ! #define PAGE_OFFSET (pixels_per_inch << 16) + (shrink_factor * 3 << 15)
-
- struct frame *stack;
- ! struct frame *stackp;
-
- #ifndef BMLONG
- #ifndef BMSHORT
- ***************
- *** 327,333 ****
- int h, w;
- {
- /* (w,h) specifies lower left corner of rule box */
- ! put_rectangle(PXL_H, PXL_V - h, w, h, False);
- }
-
- /**
- --- 334,340 ----
- int h, w;
- {
- /* (w,h) specifies lower left corner of rule box */
- ! put_rectangle(PXL_H, PXL_V - h + 1, w, h, False);
- }
-
- /**
- ***************
- *** 414,420 ****
- /* Check for changes in dvi file. */
- if (!check_dvi_file()) return;
-
- ! put_border(0, 0, PAPER_WIDTH, PAPER_HEIGHT, 1);
-
- Fseek(dvi_file, page_offset[current_page], 0);
- for (;;) {
- --- 421,428 ----
- /* Check for changes in dvi file. */
- if (!check_dvi_file()) return;
-
- ! put_border(ROUNDUP(unshrunk_paper_w, shrink_factor) + 1,
- ! ROUNDUP(unshrunk_paper_h, shrink_factor) + 1, 1);
-
- Fseek(dvi_file, page_offset[current_page], 0);
- for (;;) {
- ***************
- *** 459,487 ****
-
- case BOP:
- Fseek(dvi_file, (long) 11*4, 1);
- ! stackp = 0;
- ! DVI_H = pxl2spell(X_PAGE_OFFSET);
- ! DVI_V = pxl2spell(Y_PAGE_OFFSET);
- ! PXL_V = Y_PAGE_OFFSET;
- WW = XX = YY = ZZ = 0;
- break;
-
- case EOP:
- ! if (stackp > 0)
- ! oops("Stack not empty at EOP (%d)", stackp);
- return;
-
- case PUSH:
- stackp++;
- ! if (stackp > maxstack)
- oops("More PUSHes than were promised");
- ! stack[stackp] = stack[stackp - 1];
- break;
-
- case POP:
- ! stackp--;
- ! if (stackp < 0)
- oops("More POPs than PUSHes");
- break;
-
- case RIGHT1:
- --- 467,495 ----
-
- case BOP:
- Fseek(dvi_file, (long) 11*4, 1);
- ! stackp = stack;
- ! DVI_H = DVI_V = PAGE_OFFSET;
- ! PXL_V = pixel_conv(PAGE_OFFSET);
- WW = XX = YY = ZZ = 0;
- break;
-
- case EOP:
- ! if (stackp > stack)
- ! oops("Stack not empty at EOP (%d)",
- ! stackp - stack);
- return;
-
- case PUSH:
- stackp++;
- ! if (stackp > stack + maxstack)
- oops("More PUSHes than were promised");
- ! *stackp = stackp[-1];
- break;
-
- case POP:
- ! if (stackp <= stack)
- oops("More POPs than PUSHes");
- + stackp--;
- break;
-
- case RIGHT1:
- diff -cr old/dvi_init.c new/dvi_init.c
- *** old/dvi_init.c Sun Mar 25 21:21:39 1990
- --- new/dvi_init.c Fri Mar 16 20:46:59 1990
- ***************
- *** 12,20 ****
- --- 12,22 ----
- * --Paul Vojta, UC Berkeley.
- * 2/1989 Added tpic support --Jeffrey Lee, U of Toronto
- * 4/1989 Modified for System V by Donald Richardson, Clarkson Univ.
- + * 3/1990 Added VMS support --Scott Allendorf, U of Iowa
- *
- * Compilation options:
- * SYSV compile for System V
- + * VMS compile for VMS
- * X10 compile for X10
- * NOTOOL compile without toolkit (X11 only)
- * BUTTONS compile with buttons on the side of the window (needs toolkit)
- ***************
- *** 238,245 ****
- || denominator != four(dvi_file)
- || magnification != four(dvi_file))
- dvi_oops("Postamble doesn't match preamble");
- ! (void) four(dvi_file); /* page height */
- ! (void) four(dvi_file); /* page width */
- maxstack = two(dvi_file);
- total_pages = two(dvi_file);
- old_fonts = ¤t_font;
- --- 240,252 ----
- || denominator != four(dvi_file)
- || magnification != four(dvi_file))
- dvi_oops("Postamble doesn't match preamble");
- ! /* read largest box height and width */
- ! unshrunk_page_h = (spellfour(dvi_file) >> 16) + pixels_per_inch;
- ! if (unshrunk_page_h < unshrunk_paper_h)
- ! unshrunk_page_h = unshrunk_paper_h;
- ! unshrunk_page_w = (spellfour(dvi_file) >> 16) + pixels_per_inch;
- ! if (unshrunk_page_w < unshrunk_paper_w)
- ! unshrunk_page_w = unshrunk_paper_w;
- maxstack = two(dvi_file);
- total_pages = two(dvi_file);
- old_fonts = ¤t_font;
- ***************
- *** 315,322 ****
-
- init_page()
- {
- ! page_h = PAPER_HEIGHT;
- ! page_w = PAPER_WIDTH;
- }
-
- /*
- --- 322,329 ----
-
- init_page()
- {
- ! page_w = ROUNDUP(unshrunk_page_w, mane.shrinkfactor) + 2;
- ! page_h = ROUNDUP(unshrunk_page_h, mane.shrinkfactor) + 2;
- }
-
- /*
- diff -cr old/mksedscript new/mksedscript
- *** old/mksedscript Sun Mar 25 21:21:42 1990
- --- new/mksedscript Tue Mar 13 21:52:41 1990
- ***************
- *** 22,25 ****
- endif
- echo s\;%%DEFAULT_FONT_PATH%%\;$1\;
- echo s/%%DEFAULT_FONT_SIZES%%/$2/
- - rm -f xdvi10.man.s
- --- 22,24 ----
- diff -cr old/patchlevel.h new/patchlevel.h
- *** old/patchlevel.h Sun Mar 25 21:21:42 1990
- --- new/patchlevel.h Sun Feb 18 18:39:02 1990
- ***************
- *** 1 ****
- ! #define PATCHLEVEL 7
- --- 1 ----
- ! #define PATCHLEVEL 8
- diff -cr old/pxl_open.c new/pxl_open.c
- *** old/pxl_open.c Sun Mar 25 21:21:47 1990
- --- new/pxl_open.c Tue Mar 13 21:35:13 1990
- ***************
- *** 49,59 ****
- --- 49,71 ----
- #include <errno.h>
- extern int errno;
-
- + #ifndef VMS
- #define PATH_SEP ':'
- #define DEFAULT_TAIL "/%f.%d%p"
- + #else VMS
- + #include <string.h>
- + #define index strchr
- + #define rindex strrchr
- + #define PATH_SEP '/'
- + #define DEFAULT_TAIL ":%f.%d%p"
- + #endif VMS
-
- #ifndef OPEN_MODE
- + #ifndef VMS
- #define OPEN_MODE "r"
- + #else VMS
- + #define OPEN_MODE "r", "ctx=stm"
- + #endif VMS
- #endif OPEN_MODE
-
- extern int n_fonts_left;
- diff -cr old/xdvi.c new/xdvi.c
- *** old/xdvi.c Sun Mar 25 21:21:55 1990
- --- new/xdvi.c Fri Mar 16 20:47:25 1990
- ***************
- *** 12,20 ****
- --- 12,22 ----
- * --Paul Vojta, UC Berkeley.
- * 2/1989 Added tpic support --Jeffrey Lee, U of Toronto
- * 4/1989 Modified for System V by Donald Richardson, Clarkson Univ.
- + * 3/1990 Added VMS support --Scott Allendorf, U of Iowa
- *
- * Compilation options:
- * SYSV compile for System V
- + * VMS compile for VMS
- * X10 compile for X10
- * NOTOOL compile without toolkit (X11 only)
- * BUTTONS compile with buttons on the side of the window (needs toolkit)
- ***************
- *** 70,84 ****
- #include <X11/StringDefs.h>
- #endif not OLD_X11_TOOLKIT
- #include <X11/Shell.h> /* needed for def. of XtNiconX */
- #include <X11/Viewport.h>
- #ifdef BUTTONS
- - #include <X11/Form.h>
- #include <X11/Command.h>
- #endif BUTTONS
- #else TOOLKIT
- #define XtNumber(arr) (sizeof(arr)/sizeof(arr[0]))
- typedef int Position;
- ! typedef int Dimension;
- #ifndef X10
- typedef unsigned int Pixel;
- #define XtPending() XPending(DISP)
- --- 72,95 ----
- #include <X11/StringDefs.h>
- #endif not OLD_X11_TOOLKIT
- #include <X11/Shell.h> /* needed for def. of XtNiconX */
- + #ifndef XtSpecificationRelease
- + #define XtSpecificationRelease 0
- + #endif
- + #if XtSpecificationRelease >= 4
- + #include <X11/Xaw/Viewport.h>
- + #ifdef BUTTONS
- + #include <X11/Xaw/Command.h>
- + #endif BUTTONS
- + #else XtSpecificationRelease
- #include <X11/Viewport.h>
- #ifdef BUTTONS
- #include <X11/Command.h>
- #endif BUTTONS
- + #endif XtSpecificationRelease
- #else TOOLKIT
- #define XtNumber(arr) (sizeof(arr)/sizeof(arr[0]))
- typedef int Position;
- ! typedef unsigned int Dimension;
- #ifndef X10
- typedef unsigned int Pixel;
- #define XtPending() XPending(DISP)
- ***************
- *** 90,98 ****
-
- #include <stdio.h>
- #include <ctype.h>
- #include <fcntl.h>
- #include <signal.h>
- ! #include "xdvi.h"
-
- #ifndef X10
- static Display *DISP;
- --- 101,112 ----
-
- #include <stdio.h>
- #include <ctype.h>
- + #include "xdvi.h"
- +
- + #ifdef HAS_SIGIO
- #include <fcntl.h>
- #include <signal.h>
- ! #endif HAS_SIGIO
-
- #ifndef X10
- static Display *DISP;
- ***************
- *** 99,106 ****
- #define DPY DISP,
- static Screen *SCRN;
- static Cursor redraw_cursor, ready_cursor;
- ! #define SetCursor(x) XDefineCursor(DISP, mane.win, x)
- ! #define ClearPage(wr) XClearWindow(DISP, (wr).win);
- #define ClearArea(win, x, y, w, h) XClearArea(DISP, win, x, y, w, h, False)
- #define DarkenArea(win, x, y, w, h) \
- XFillRectangle(DISP, win, ruleGC, x, y, w, h)
- --- 113,120 ----
- #define DPY DISP,
- static Screen *SCRN;
- static Cursor redraw_cursor, ready_cursor;
- ! #define SetCursor(x) XDefineCursor(DISP, WINDOW(mane), x)
- ! #define ClearPage(wr) XClearWindow(DISP, WINDOW(wr));
- #define ClearArea(win, x, y, w, h) XClearArea(DISP, win, x, y, w, h, False)
- #define DarkenArea(win, x, y, w, h) \
- XFillRectangle(DISP, win, ruleGC, x, y, w, h)
- ***************
- *** 115,121 ****
- #define DPY
- #define GC int
- #define SetCursor(x)
- ! #define ClearPage(wr) XClear((wr).win);
- #define ClearArea(win, x, y, w, h) XPixSet(win, x, y, w, h, backpix)
- #define DarkenArea(win, x, y, w, h) XPixSet(win, x, y, w, h, foreGC)
- #define CopyArea(win, x, y, w, h, x2, y2) \
- --- 129,135 ----
- #define DPY
- #define GC int
- #define SetCursor(x)
- ! #define ClearPage(wr) XClear(WINDOW(wr));
- #define ClearArea(win, x, y, w, h) XPixSet(win, x, y, w, h, backpix)
- #define DarkenArea(win, x, y, w, h) XPixSet(win, x, y, w, h, foreGC)
- #define CopyArea(win, x, y, w, h, x2, y2) \
- ***************
- *** 140,145 ****
- --- 154,160 ----
-
- int density = 40;
- int pixels_per_inch = 300;
- + int unshrunk_paper_w, unshrunk_paper_h;
- int unshrunk_page_w, unshrunk_page_h;
- static char *paper = DEFAULT_PAPER;
- static char *margins, *sidemargin, *topmargin;
- ***************
- *** 240,254 ****
- {XtNlabel, (XtArgVal) ""},
- };
-
- - static void set_draw_args();
- -
- #ifdef BUTTONS
- - static Widget form_widget;
- -
- static Arg form_args[] = {
- {XtNdefaultDistance, (XtArgVal) 0},
- };
-
- static struct {
- char *label;
- char *name;
- --- 255,289 ----
- {XtNlabel, (XtArgVal) ""},
- };
-
- #ifdef BUTTONS
- static Arg form_args[] = {
- {XtNdefaultDistance, (XtArgVal) 0},
- };
- + #define XTRA_WID 79
-
- + static Arg line_args[] = {
- + {XtNbackground, (XtArgVal) 0},
- + {XtNwidth, (XtArgVal) 1},
- + {XtNheight, (XtArgVal) 0},
- + {XtNfromHoriz, (XtArgVal) NULL},
- + {XtNborderWidth, (XtArgVal) 0},
- + {XtNtop, (XtArgVal) XtChainTop},
- + {XtNbottom, (XtArgVal) XtChainBottom},
- + {XtNleft, (XtArgVal) XtChainRight},
- + {XtNright, (XtArgVal) XtChainRight},
- + };
- +
- + static Arg right_args[] = {
- + {XtNfromHoriz, (XtArgVal) NULL},
- + {XtNwidth, (XtArgVal) (XTRA_WID - 1)},
- + {XtNheight, (XtArgVal) 0},
- + {XtNborderWidth, (XtArgVal) 0},
- + {XtNtop, (XtArgVal) XtChainTop},
- + {XtNbottom, (XtArgVal) XtChainBottom},
- + {XtNleft, (XtArgVal) XtChainRight},
- + {XtNright, (XtArgVal) XtChainRight},
- + };
- +
- static struct {
- char *label;
- char *name;
- ***************
- *** 269,276 ****
- {"Page-10", "prev10", 10 << 8 | 'p', 700},
- };
-
- - static Widget command_wid[XtNumber(command_table)];
- -
- static void handle_command();
-
- static XtCallbackRec command_call[] = {
- --- 304,309 ----
- ***************
- *** 280,320 ****
-
- static Arg command_args[] = {
- {XtNlabel, NULL},
- ! {XtNvertDistance, (XtArgVal) 0},
- ! {XtNfromHoriz, (XtArgVal) NULL},
- ! {XtNhorizDistance, (XtArgVal) 7},
- {XtNwidth, (XtArgVal) 64},
- {XtNheight, (XtArgVal) 30},
- - {XtNtop, (XtArgVal) XtChainTop},
- - {XtNbottom, (XtArgVal) XtChainTop},
- - {XtNleft, (XtArgVal) XtChainRight},
- - {XtNright, (XtArgVal) XtChainRight},
- {XtNcallback, (XtArgVal) command_call},
- };
- -
- - static Arg line_args[] = {
- - {XtNbackground, (XtArgVal) 0},
- - {XtNwidth, (XtArgVal) 1},
- - {XtNheight, (XtArgVal) 0},
- - {XtNfromHoriz, (XtArgVal) NULL},
- - {XtNborderWidth, (XtArgVal) 0},
- - {XtNtop, (XtArgVal) XtChainTop},
- - {XtNbottom, (XtArgVal) XtChainBottom},
- - {XtNleft, (XtArgVal) XtChainRight},
- - {XtNright, (XtArgVal) XtChainRight},
- - };
- -
- - static Arg strut_args[] = {
- - {XtNfromHoriz, (XtArgVal) NULL},
- - {XtNwidth, (XtArgVal) 78},
- - {XtNheight, (XtArgVal) 2},
- - {XtNmappedWhenManaged, (XtArgVal) False},
- - {XtNborderWidth, (XtArgVal) 0},
- - {XtNtop, (XtArgVal) XtChainTop},
- - {XtNbottom, (XtArgVal) XtChainTop},
- - {XtNleft, (XtArgVal) XtChainRight},
- - {XtNright, (XtArgVal) XtChainRight},
- - };
- #endif BUTTONS
-
- #else TOOLKIT
- --- 313,324 ----
-
- static Arg command_args[] = {
- {XtNlabel, NULL},
- ! {XtNx, (XtArgVal) 6},
- ! {XtNy, (XtArgVal) 0},
- {XtNwidth, (XtArgVal) 64},
- {XtNheight, (XtArgVal) 30},
- {XtNcallback, (XtArgVal) command_call},
- };
- #endif BUTTONS
-
- #else TOOLKIT
- ***************
- *** 359,365 ****
- #ifdef TOOLKIT
- WidgetClass viewportWidgetClass, widgetClass;
- #ifdef BUTTONS
- ! WidgetClass formWidgetClass, commandWidgetClass;
- #endif BUTTONS
- #endif TOOLKIT
- #else X10
- --- 363,369 ----
- #ifdef TOOLKIT
- WidgetClass viewportWidgetClass, widgetClass;
- #ifdef BUTTONS
- ! WidgetClass formWidgetClass, compositeWidgetClass, commandWidgetClass;
- #endif BUTTONS
- #endif TOOLKIT
- #else X10
- ***************
- *** 405,415 ****
- if ((fcx < max_x || tcx < max_x) && (fcx >= min_x || tcx >= min_x) &&
- (fcy < max_y || tcy < max_y) && (fcy >= min_y || tcy >= min_y))
- #ifndef X10
- ! XDrawLine(DISP, curr.win, ruleGC,
- fcx - curr.base_x, fcy - curr.base_y,
- tcx - curr.base_x, tcy - curr.base_y);
- #else X10
- ! XLine(curr.win,
- fcx - curr.base_x, fcy - curr.base_y,
- tcx - curr.base_x, tcy - curr.base_y,
- 1, 1, ruleGC, GXcopy, AllPlanes);
- --- 409,419 ----
- if ((fcx < max_x || tcx < max_x) && (fcx >= min_x || tcx >= min_x) &&
- (fcy < max_y || tcy < max_y) && (fcy >= min_y || tcy >= min_y))
- #ifndef X10
- ! XDrawLine(DISP, WINDOW(curr), ruleGC,
- fcx - curr.base_x, fcy - curr.base_y,
- tcx - curr.base_x, tcy - curr.base_y);
- #else X10
- ! XLine(WINDOW(curr),
- fcx - curr.base_x, fcy - curr.base_y,
- tcx - curr.base_x, tcy - curr.base_y,
- 1, 1, ruleGC, GXcopy, AllPlanes);
- ***************
- *** 427,436 ****
-
- if (cx < max_x && cx >= min_x && cy < max_y && cy >= min_y)
- #ifndef X10
- ! XDrawPoint(DISP, curr.win, ruleGC,
- cx - curr.base_x, cy - curr.base_y);
- #else X10
- ! XPixSet((Window) curr.win, cx - curr.base_x, cy - curr.base_y,
- 1, 1, ruleGC);
- #endif X10
- }
- --- 431,440 ----
-
- if (cx < max_x && cx >= min_x && cy < max_y && cy >= min_y)
- #ifndef X10
- ! XDrawPoint(DISP, WINDOW(curr), ruleGC,
- cx - curr.base_x, cy - curr.base_y);
- #else X10
- ! XPixSet(WINDOW(curr), cx - curr.base_x, cy - curr.base_y,
- 1, 1, ruleGC);
- #endif X10
- }
- ***************
- *** 458,467 ****
- if (x < max_x && x + w >= min_x && y < max_y && y + h >= min_y) {
- if (--event_counter == 0) read_events(False);
- #ifndef X10
- ! XFillRectangle(DISP, (Window) curr.win, hl ? highGC : ruleGC,
- x - curr.base_x, y - curr.base_y, w?w:1, h?h:1);
- #else X10
- ! XPixSet((Window) curr.win, x - curr.base_x, y - curr.base_y,
- w?w:1, h?h:1, hl ? highGC : ruleGC);
- #endif X10
- }
- --- 462,471 ----
- if (x < max_x && x + w >= min_x && y < max_y && y + h >= min_y) {
- if (--event_counter == 0) read_events(False);
- #ifndef X10
- ! XFillRectangle(DISP, WINDOW(curr), hl ? highGC : ruleGC,
- x - curr.base_x, y - curr.base_y, w?w:1, h?h:1);
- #else X10
- ! XPixSet(WINDOW(curr), x - curr.base_x, y - curr.base_y,
- w?w:1, h?h:1, hl ? highGC : ruleGC);
- #endif X10
- }
- ***************
- *** 482,498 ****
- image->height = bitmap->h;
- image->data = bitmap->bits;
- image->bytes_per_line = bitmap->bytes_wide;
- ! XPutImage(DISP, curr.win, foreGC, image,
- 0, 0,
- x - curr.base_x, y - curr.base_y,
- bitmap->w, bitmap->h);
- if (foreGC2)
- ! XPutImage(DISP, curr.win, foreGC2, image,
- 0, 0,
- x - curr.base_x, y - curr.base_y,
- bitmap->w, bitmap->h);
- #else X10
- ! XBitmapBitsPut(curr.win, x - curr.base_x, y - curr.base_y,
- bitmap->w, bitmap->h, bitmap->bits,
- foreGC, backpix, NULL, GXfunc, AllPlanes);
- #endif X10
- --- 486,502 ----
- image->height = bitmap->h;
- image->data = bitmap->bits;
- image->bytes_per_line = bitmap->bytes_wide;
- ! XPutImage(DISP, WINDOW(curr), foreGC, image,
- 0, 0,
- x - curr.base_x, y - curr.base_y,
- bitmap->w, bitmap->h);
- if (foreGC2)
- ! XPutImage(DISP, WINDOW(curr), foreGC2, image,
- 0, 0,
- x - curr.base_x, y - curr.base_y,
- bitmap->w, bitmap->h);
- #else X10
- ! XBitmapBitsPut(WINDOW(curr), x - curr.base_x, y - curr.base_y,
- bitmap->w, bitmap->h, bitmap->bits,
- foreGC, backpix, NULL, GXfunc, AllPlanes);
- #endif X10
- ***************
- *** 499,511 ****
- }
- }
-
- ! put_border(x, y, w, h, t)
- ! int x, y, w, h, t;
- {
- ! put_rectangle(x, y, w, t, True);
- ! put_rectangle(x, y, t, h, True);
- ! put_rectangle(x, y + h - t, w, t, True);
- ! put_rectangle(x + w - t, y, t, h, True);
- }
-
- /*
- --- 503,515 ----
- }
- }
-
- ! put_border(w, h, t)
- ! int w, h, t;
- {
- ! put_rectangle(0, 0, w, t, True); /* top */
- ! put_rectangle(w, 0, t, h, True); /* right */
- ! put_rectangle(t, h, w, t, True); /* bottom */
- ! put_rectangle(0, t, t, h, True); /* left */
- }
-
- /*
- ***************
- *** 530,536 ****
- struct WindowRec *windowrec;
- int x, y, w, h;
- {
- ! ClearArea((Window) windowrec->win, x, y, w, h);
- expose(windowrec, x, y, w, h);
- }
-
- --- 534,540 ----
- struct WindowRec *windowrec;
- int x, y, w, h;
- {
- ! ClearArea(WINDOW(*windowrec), x, y, w, h);
- expose(windowrec, x, y, w, h);
- }
-
- ***************
- *** 580,586 ****
- windowrec->max_y = windowrec->height;
- }
- else {
- ! CopyArea(windowrec->win, x, y, ww, hh, x2, y2);
- if (x > 0) clearexpose(windowrec, ww, 0, x, windowrec->height);
- if (x2 > 0) clearexpose(windowrec, 0, 0, x2, windowrec->height);
- if (y > 0) clearexpose(windowrec, 0, hh, windowrec->width, y);
- --- 584,590 ----
- windowrec->max_y = windowrec->height;
- }
- else {
- ! CopyArea(WINDOW(*windowrec), x, y, ww, hh, x2, y2);
- if (x > 0) clearexpose(windowrec, ww, 0, x, windowrec->height);
- if (x2 > 0) clearexpose(windowrec, 0, 0, x2, windowrec->height);
- if (y > 0) clearexpose(windowrec, 0, hh, windowrec->width, y);
- ***************
- *** 730,740 ****
- else { /* this stuff avoids flicker */
- if (x_bgn < new_x_bgn)
- ClearArea(x_bar, x_bgn, 1, new_x_bgn - x_bgn, BAR_WID);
- ! else if (x_bgn > new_x_bgn)
- DarkenArea(x_bar, new_x_bgn, 1, x_bgn - new_x_bgn, BAR_WID);
- if (new_x_end < x_end)
- ClearArea(x_bar, new_x_end, 1, x_end - new_x_end, BAR_WID);
- ! else if (new_x_end > x_end)
- DarkenArea(x_bar, x_end, 1, new_x_end - x_end, BAR_WID);
- }
- x_bgn = new_x_bgn;
- --- 734,744 ----
- else { /* this stuff avoids flicker */
- if (x_bgn < new_x_bgn)
- ClearArea(x_bar, x_bgn, 1, new_x_bgn - x_bgn, BAR_WID);
- ! else
- DarkenArea(x_bar, new_x_bgn, 1, x_bgn - new_x_bgn, BAR_WID);
- if (new_x_end < x_end)
- ClearArea(x_bar, new_x_end, 1, x_end - new_x_end, BAR_WID);
- ! else
- DarkenArea(x_bar, x_end, 1, new_x_end - x_end, BAR_WID);
- }
- x_bgn = new_x_bgn;
- ***************
- *** 754,764 ****
- else { /* this stuff avoids flicker */
- if (y_bgn < new_y_bgn)
- ClearArea(y_bar, 1, y_bgn, BAR_WID, new_y_bgn - y_bgn);
- ! else if (y_bgn > new_y_bgn)
- DarkenArea(y_bar, 1, new_y_bgn, BAR_WID, y_bgn - new_y_bgn);
- if (new_y_end < y_end)
- ClearArea(y_bar, 1, new_y_end, BAR_WID, y_end - new_y_end);
- ! else if (new_y_end > y_end)
- DarkenArea(y_bar, 1, y_end, BAR_WID, new_y_end - y_end);
- }
- y_bgn = new_y_bgn;
- --- 758,768 ----
- else { /* this stuff avoids flicker */
- if (y_bgn < new_y_bgn)
- ClearArea(y_bar, 1, y_bgn, BAR_WID, new_y_bgn - y_bgn);
- ! else
- DarkenArea(y_bar, 1, new_y_bgn, BAR_WID, y_bgn - new_y_bgn);
- if (new_y_end < y_end)
- ClearArea(y_bar, 1, new_y_end, BAR_WID, y_end - new_y_end);
- ! else
- DarkenArea(y_bar, 1, y_end, BAR_WID, new_y_end - y_end);
- }
- y_bgn = new_y_bgn;
- ***************
- *** 797,818 ****
- if (mane.win == NULL) { /* initial creation */
- #ifndef X10
- mane.win = (caddr_t) XCreateSimpleWindow(DISP, top_level,
- ! y_thick, x_thick, clip_w, clip_h, 0,
- fore_Pixel, back_Pixel);
- ! XSelectInput(DPY (Window) mane.win, ExposureMask |
- ButtonPressMask | ButtonMotionMask | ButtonReleaseMask);
- #else X10
- mane.win = (caddr_t) XCreateWindow(top_level,
- y_thick, x_thick, clip_w, clip_h, 0,
- bdrmap, backmap);
- ! XSelectInput((Window) mane.win, ExposeRegion | ExposeCopy |
- ButtonPressed | ButtonReleased |
- LeftDownMotion | MiddleDownMotion | RightDownMotion);
- #endif X10
- ! XMapWindow(DPY (Window) mane.win);
- }
- else
- ! XMoveResizeWindow(DPY (Window) mane.win,
- y_thick, x_thick, clip_w, clip_h);
-
- /* process scroll bars */
- --- 801,823 ----
- if (mane.win == NULL) { /* initial creation */
- #ifndef X10
- mane.win = (caddr_t) XCreateSimpleWindow(DISP, top_level,
- ! y_thick, x_thick,
- ! (unsigned int) clip_w, (unsigned int) clip_h, 0,
- fore_Pixel, back_Pixel);
- ! XSelectInput(DPY WINDOW(mane), ExposureMask |
- ButtonPressMask | ButtonMotionMask | ButtonReleaseMask);
- #else X10
- mane.win = (caddr_t) XCreateWindow(top_level,
- y_thick, x_thick, clip_w, clip_h, 0,
- bdrmap, backmap);
- ! XSelectInput(WINDOW(mane), ExposeRegion | ExposeCopy |
- ButtonPressed | ButtonReleased |
- LeftDownMotion | MiddleDownMotion | RightDownMotion);
- #endif X10
- ! XMapWindow(DPY WINDOW(mane));
- }
- else
- ! XMoveResizeWindow(DPY WINDOW(mane),
- y_thick, x_thick, clip_w, clip_h);
-
- /* process scroll bars */
- ***************
- *** 824,831 ****
- }
- else {
- #ifndef X10
- ! x_bar = XCreateSimpleWindow(DISP, top_level,
- ! y_thick - 1, -1, clip_w, BAR_THICK - 1, 1,
- fore_Pixel, back_Pixel);
- XSelectInput(DISP, x_bar,
- ExposureMask | ButtonPressMask | Button2MotionMask);
- --- 829,836 ----
- }
- else {
- #ifndef X10
- ! x_bar = XCreateSimpleWindow(DISP, top_level, y_thick - 1, -1,
- ! (unsigned int) clip_w, BAR_THICK - 1, 1,
- fore_Pixel, back_Pixel);
- XSelectInput(DISP, x_bar,
- ExposureMask | ButtonPressMask | Button2MotionMask);
- ***************
- *** 855,862 ****
- }
- else {
- #ifndef X10
- ! y_bar = XCreateSimpleWindow(DISP, top_level,
- ! -1, x_thick - 1, BAR_THICK - 1, clip_h, 1,
- fore_Pixel, back_Pixel);
- XSelectInput(DISP, y_bar,
- ExposureMask | ButtonPressMask | Button2MotionMask);
- --- 860,867 ----
- }
- else {
- #ifndef X10
- ! y_bar = XCreateSimpleWindow(DISP, top_level, -1, x_thick - 1,
- ! BAR_THICK - 1, (unsigned int) clip_h, 1,
- fore_Pixel, back_Pixel);
- XSelectInput(DISP, y_bar,
- ExposureMask | ButtonPressMask | Button2MotionMask);
- ***************
- *** 989,1002 ****
- InputOutput, CopyFromParent,
- CWSaveUnder | CWBorderPixel | CWBackPixel |
- CWOverrideRedirect, &attr);
- ! XSelectInput(DISP, (Window) alt.win, ExposureMask);
- #else X10
- ! alt.win = (caddr_t) XCreateWindow((Window) mane.win,
- x, y, alt.width, alt.height, MAGBORD,
- bdrmap, backmap);
- ! XSelectInput((Window) alt.win, ExposeRegion);
- #endif X10
- ! XMapWindow(DPY (Window) alt.win);
- alt_stat = 1; /* waiting for exposure */
- }
- }
- --- 994,1007 ----
- InputOutput, CopyFromParent,
- CWSaveUnder | CWBorderPixel | CWBackPixel |
- CWOverrideRedirect, &attr);
- ! XSelectInput(DISP, WINDOW(alt), ExposureMask);
- #else X10
- ! alt.win = (caddr_t) XCreateWindow(WINDOW(mane),
- x, y, alt.width, alt.height, MAGBORD,
- bdrmap, backmap);
- ! XSelectInput(WINDOW(alt), ExposeRegion);
- #endif X10
- ! XMapWindow(DPY WINDOW(alt));
- alt_stat = 1; /* waiting for exposure */
- }
- }
- ***************
- *** 1027,1033 ****
- mag_y = y;
- if (mag_x == new_mag_x && mag_y == new_mag_y) mag_moved = False;
- compute_mag_pos(&xx, &yy);
- ! XMoveWindow(DPY alt.win, xx, yy);
- scrollwindow(&alt, (x + mane_base_x) * mane.shrinkfactor - alt.width/2,
- (y + mane_base_y) * mane.shrinkfactor - alt.height/2);
- }
- --- 1032,1038 ----
- mag_y = y;
- if (mag_x == new_mag_x && mag_y == new_mag_y) mag_moved = False;
- compute_mag_pos(&xx, &yy);
- ! XMoveWindow(DPY WINDOW(alt), xx, yy);
- scrollwindow(&alt, (x + mane_base_x) * mane.shrinkfactor - alt.width/2,
- (y + mane_base_y) * mane.shrinkfactor - alt.height/2);
- }
- ***************
- *** 1047,1053 ****
- if (alt.win)
- if (alt_stat) alt_stat = -1; /* destroy upon expose */
- else {
- ! XDestroyWindow(DPY (Window) alt.win);
- if (curr.win == alt.win) alt_canit = True;
- alt.win = NULL;
- mag_moved = False;
- --- 1052,1058 ----
- if (alt.win)
- if (alt_stat) alt_stat = -1; /* destroy upon expose */
- else {
- ! XDestroyWindow(DPY WINDOW(alt));
- if (curr.win == alt.win) alt_canit = True;
- alt.win = NULL;
- mag_moved = False;
- ***************
- *** 1115,1120 ****
- --- 1120,1128 ----
- XEvent *eventp;
- {
- int next_page;
- + #ifndef X10
- + Window ww;
- + #endif X10
-
- next_page = current_page;
- switch (ch) {
- ***************
- *** 1198,1210 ****
- case 'c': /* unchecked scrollmane() */
- scrollwindow(&mane, mane.base_x + XKEY(*eventp).x - clip_w/2,
- mane.base_y + XKEY(*eventp).y - clip_h/2);
- ! paint_x_bar();
- ! paint_y_bar();
- #ifndef X10
- XWarpPointer(DISP, None, None, 0, 0, 0, 0,
- clip_w/2 - XKEY(*eventp).x, clip_h/2 - XKEY(*eventp).y);
- #else X10
- ! XWarpMouse(mane.win, clip_w/2, clip_h/2, GXcopy);
- #endif X10
- return;
- #endif TOOLKIT
- --- 1206,1218 ----
- case 'c': /* unchecked scrollmane() */
- scrollwindow(&mane, mane.base_x + XKEY(*eventp).x - clip_w/2,
- mane.base_y + XKEY(*eventp).y - clip_h/2);
- ! if (x_bar) paint_x_bar();
- ! if (y_bar) paint_y_bar();
- #ifndef X10
- XWarpPointer(DISP, None, None, 0, 0, 0, 0,
- clip_w/2 - XKEY(*eventp).x, clip_h/2 - XKEY(*eventp).y);
- #else X10
- ! XWarpMouse(WINDOW(mane), clip_w/2, clip_h/2, GXcopy);
- #endif X10
- return;
- #endif TOOLKIT
- ***************
- *** 1211,1219 ****
-
- #ifndef X10
- case 'M':
- ! XTranslateCoordinates(DISP, eventp->xkey.window, mane.win,
- ! eventp->xkey.x, eventp->xkey.y, &home_x, &home_y,
- ! &number0); /* throw away last argument */
- home_x *= mane.shrinkfactor;
- home_y *= mane.shrinkfactor;
- return;
- --- 1219,1227 ----
-
- #ifndef X10
- case 'M':
- ! XTranslateCoordinates(DISP, eventp->xkey.window,
- ! WINDOW(mane), eventp->xkey.x, eventp->xkey.y,
- ! &home_x, &home_y, &ww); /* throw away last argument */
- home_x *= mane.shrinkfactor;
- home_y *= mane.shrinkfactor;
- return;
- ***************
- *** 1230,1247 ****
- #endif X10
- case 's':
- if (!arg0) {
- ! long fac1, fac2;
- ! shrink_factor = 1;
- ! fac1 = ROUNDUP(PAPER_WIDTH, window_w);
- ! fac2 = ROUNDUP(PAPER_HEIGHT, window_h);
- ! if (fac1 < fac2)
- ! number0 = fac2;
- ! else
- ! number0 = fac1;
- }
- if (number0 <= 0) goto bad;
- if (number0 == mane.shrinkfactor) return;
- ! shrink_factor = mane.shrinkfactor = number0;
- init_page();
- if (number0 != 1 && number0 != bak_shrink) {
- bak_shrink = number0;
- --- 1238,1251 ----
- #endif X10
- case 's':
- if (!arg0) {
- ! int temp;
- ! number0 = ROUNDUP(unshrunk_page_w, window_w - 2);
- ! temp = ROUNDUP(unshrunk_page_h, window_h - 2);
- ! if (number0 < temp) number0 = temp;
- }
- if (number0 <= 0) goto bad;
- if (number0 == mane.shrinkfactor) return;
- ! mane.shrinkfactor = number0;
- init_page();
- if (number0 != 1 && number0 != bak_shrink) {
- bak_shrink = number0;
- ***************
- *** 1248,1259 ****
- reset_fonts();
- }
- #ifdef TOOLKIT
- ! XUnmapWindow(DISP, mane.win);
- ! set_draw_args();
- ! XtSetValues(draw_widget, draw_args, (Cardinal) 2);
- get_geom();
- home(False);
- ! XMapWindow(DISP, (Window) mane.win);
- /* Wait for next event; this will likely be an expose event,
- so we don't redraw the window twice. */
- {
- --- 1252,1269 ----
- reset_fonts();
- }
- #ifdef TOOLKIT
- ! XUnmapWindow(DISP, WINDOW(mane));
- ! {
- ! Dimension replyW, replyH;
- ! if (XtMakeResizeRequest(draw_widget, (Dimension) page_w,
- ! (Dimension) page_h, &replyW, &replyH)
- ! == XtGeometryAlmost)
- ! (void) XtMakeResizeRequest(draw_widget, replyW, replyH,
- ! (Dimension *) NULL, (Dimension *) NULL);
- ! }
- get_geom();
- home(False);
- ! XMapWindow(DISP, WINDOW(mane));
- /* Wait for next event; this will likely be an expose event,
- so we don't redraw the window twice. */
- {
- ***************
- *** 1330,1336 ****
- #ifdef TOOLKIT
- XtNextEvent(&event);
- if (resized) get_geom();
- ! if (event.xany.window == (Window) alt.win &&
- event.type == Expose) {
- handle_exp((Widget) NULL, &alt, &event.xexpose);
- continue;
- --- 1340,1346 ----
- #ifdef TOOLKIT
- XtNextEvent(&event);
- if (resized) get_geom();
- ! if (event.xany.window == WINDOW(alt) &&
- event.type == Expose) {
- handle_exp((Widget) NULL, &alt, &event.xexpose);
- continue;
- ***************
- *** 1340,1357 ****
- continue;
- }
- string = trbuf;
- ! nbytes = XLookupString(&event, string, TRSIZE, NULL, NULL);
- if (nbytes > 1) ch = '?';
- if (nbytes != 0) ch = *string;
- #else TOOLKIT
-
- XNextEvent(DPY &event);
- ! if (XANY(event).window == (Window) mane.win ||
- ! XANY(event).window == (Window) alt.win) {
-
- struct WindowRec *wr = &mane;
-
- ! if (XANY(event).window == (Window) alt.win) {
- wr = &alt;
- /* check in case we already destroyed the window */
- if (alt_stat < 0) { /* destroy upon exposure */
- --- 1350,1367 ----
- continue;
- }
- string = trbuf;
- ! nbytes = XLookupString(&event.xkey, string, TRSIZE, NULL, NULL);
- if (nbytes > 1) ch = '?';
- if (nbytes != 0) ch = *string;
- #else TOOLKIT
-
- XNextEvent(DPY &event);
- ! if (XANY(event).window == WINDOW(mane) ||
- ! XANY(event).window == WINDOW(alt)) {
-
- struct WindowRec *wr = &mane;
-
- ! if (XANY(event).window == WINDOW(alt)) {
- wr = &alt;
- /* check in case we already destroyed the window */
- if (alt_stat < 0) { /* destroy upon exposure */
- ***************
- *** 1480,1486 ****
- case KeyPress:
- #ifndef X10
- string = trbuf;
- ! nbytes = XLookupString(&event, string, TRSIZE, NULL, NULL);
- #else X10
- string = XLookupMapping(&event, &nbytes);
- #endif X10
- --- 1490,1497 ----
- case KeyPress:
- #ifndef X10
- string = trbuf;
- ! nbytes = XLookupString(&event.xkey, string, TRSIZE, NULL,
- ! NULL);
- #else X10
- string = XLookupMapping(&event, &nbytes);
- #endif X10
- ***************
- *** 1534,1545 ****
- ClearPage(mane);
- #ifndef X10
- get_xy();
- ! XDrawString(DISP, mane.win, foreGC,
- 5 - window_x, 5 + X11HEIGHT - window_y,
- errtext, strlen(errtext));
- #else X10
- if (!font) font = XOpenFont(X10FONT);
- ! XTextMask(mane.win, 5, 5 + X10HEIGHT, errtext, strlen(errtext),
- font->id, foreGC);
- #endif X10
- if (dvi_file) {
- --- 1545,1556 ----
- ClearPage(mane);
- #ifndef X10
- get_xy();
- ! XDrawString(DISP, WINDOW(mane), foreGC,
- 5 - window_x, 5 + X11HEIGHT - window_y,
- errtext, strlen(errtext));
- #else X10
- if (!font) font = XOpenFont(X10FONT);
- ! XTextMask(WINDOW(mane), 5, 5 + X10HEIGHT, errtext, strlen(errtext),
- font->id, foreGC);
- #endif X10
- if (dvi_file) {
- ***************
- *** 1703,1710 ****
- {"-margins", ".margins", XrmoptionSepArg, (caddr_t) NULL},
- {"-sidemargin", ".sideMargin", XrmoptionSepArg, (caddr_t) NULL},
- {"-topmargin", ".topMargin", XrmoptionSepArg, (caddr_t) NULL},
- ! {"-pagewidth", ".pageWidth", XrmoptionSepArg, (caddr_t) NULL},
- ! {"-pageheight", ".pageHeight", XrmoptionSepArg, (caddr_t) NULL},
- {"-altfont", ".altFont", XrmoptionSepArg, (caddr_t) NULL},
- {"-l", ".listFonts", XrmoptionNoArg, (caddr_t) "on"},
- {"+l", ".listFonts", XrmoptionNoArg, (caddr_t) "off"},
- --- 1714,1720 ----
- {"-margins", ".margins", XrmoptionSepArg, (caddr_t) NULL},
- {"-sidemargin", ".sideMargin", XrmoptionSepArg, (caddr_t) NULL},
- {"-topmargin", ".topMargin", XrmoptionSepArg, (caddr_t) NULL},
- ! {"-paper", ".paper", XrmoptionSepArg, (caddr_t) NULL},
- {"-altfont", ".altFont", XrmoptionSepArg, (caddr_t) NULL},
- {"-l", ".listFonts", XrmoptionNoArg, (caddr_t) "on"},
- {"+l", ".listFonts", XrmoptionNoArg, (caddr_t) "off"},
- ***************
- *** 1786,1797 ****
- (Cardinal) &mg_size[4], XtRInt, (caddr_t) &mg_size[4]},
- };
-
- - static void
- - set_draw_args() {
- - draw_args[0].value = (XtArgVal) page_w;
- - draw_args[1].value = (XtArgVal) page_h;
- - }
- -
- static Arg temp_args1[] = {
- {XtNiconX, (XtArgVal) 0},
- {XtNiconY, (XtArgVal) 0},
- --- 1796,1801 ----
- ***************
- *** 1861,1868 ****
- {"-margins", "margins", SepArg, StringArg, (caddr_t) &margins},
- {"-sidemargin", "sideMargin", SepArg, StringArg, (caddr_t) &sidemargin},
- {"-topmargin", "topMargin", SepArg, StringArg, (caddr_t) &topmargin},
- - {"-altfont", "altFont", SepArg, StringArg, (caddr_t) &alt_font},
- {"-paper", "paper", SepArg, StringArg, (caddr_t) &paper},
- {"-l", "listFonts", TrueArg, BooleanArg, (caddr_t) &list_fonts},
- {"+l", NULL, FalseArg, BooleanArg, (caddr_t) &list_fonts},
- {"-rv", "reverseVideo", TrueArg, BooleanArg, (caddr_t) &reverse},
- --- 1865,1872 ----
- {"-margins", "margins", SepArg, StringArg, (caddr_t) &margins},
- {"-sidemargin", "sideMargin", SepArg, StringArg, (caddr_t) &sidemargin},
- {"-topmargin", "topMargin", SepArg, StringArg, (caddr_t) &topmargin},
- {"-paper", "paper", SepArg, StringArg, (caddr_t) &paper},
- + {"-altfont", "altFont", SepArg, StringArg, (caddr_t) &alt_font},
- {"-l", "listFonts", TrueArg, BooleanArg, (caddr_t) &list_fonts},
- {"+l", NULL, FalseArg, BooleanArg, (caddr_t) &list_fonts},
- {"-rv", "reverseVideo", TrueArg, BooleanArg, (caddr_t) &reverse},
- ***************
- *** 2073,2079 ****
- char **p;
- char *q;
-
- ! if (strlen(paper) > 20) return False;
- i = 0;
- for (;;) { /* convert to lower case */
- c = paper[i];
- --- 2077,2083 ----
- char **p;
- char *q;
-
- ! if (strlen(paper) > sizeof(temp) - 1) return False;
- i = 0;
- for (;;) { /* convert to lower case */
- c = paper[i];
- ***************
- *** 2086,2091 ****
- --- 2090,2096 ----
- for (p = paper_types; p < paper_types + XtNumber(paper_types); p += 2)
- if (strcmp(temp, *p) == 0) {
- (void) strcpy(temp, p[1]);
- + i = strlen(temp);
- break;
- }
- if (i > 2 && strcmp(temp + i - 2, "cm") == 0) {
- ***************
- *** 2096,2104 ****
- if (q == NULL) return False;
- *q = '\0';
- factor *= pixels_per_inch;
- ! unshrunk_page_w = atof(temp) * factor + 0.5;
- ! unshrunk_page_h = atof(q + 1) * factor + 0.5;
- ! return (unshrunk_page_w != 0 && unshrunk_page_h != 0);
- }
-
- /*
- --- 2101,2109 ----
- if (q == NULL) return False;
- *q = '\0';
- factor *= pixels_per_inch;
- ! unshrunk_paper_w = atof(temp) * factor + 0.5;
- ! unshrunk_paper_h = atof(q + 1) * factor + 0.5;
- ! return (unshrunk_paper_w != 0 && unshrunk_paper_h != 0);
- }
-
- /*
- ***************
- *** 2110,2116 ****
- char **argv;
- {
-
- ! #ifndef TOOLKIT
- #ifndef X10
- XSizeHints size_hints;
- XWMHints wmhints;
- --- 2115,2124 ----
- char **argv;
- {
-
- ! #ifdef TOOLKIT
- ! Widget form_widget;
- ! Widget right_widget;
- ! #else TOOLKIT
- #ifndef X10
- XSizeHints size_hints;
- XWMHints wmhints;
- ***************
- *** 2124,2132 ****
- --- 2132,2148 ----
- #endif TOOLKIT
- int screen_w, screen_h;
-
- + #ifndef VMS
- prog = rindex(*argv, '/');
- + #else
- + prog = rindex(*argv, ']');
- + #endif
- if (prog != NULL) ++prog; else prog = *argv;
-
- + #ifdef VMS
- + if (index(prog, '.') != NULL) *index(prog, '.') = '\0';
- + #endif
- +
- #ifdef TOOLKIT
- top_level = XtInitialize(prog, "XDvi", options, XtNumber(options),
- &argc, argv);
- ***************
- *** 2243,2249 ****
- scr++);
-
- XGeometry(DISP, scr, icon_geometry, "", 0, 0, 0, 0, 0,
- ! &temp_args1[0].value, &temp_args1[1].value, &junk, &junk);
- XtSetValues(top_level, temp_args1, XtNumber(temp_args1));
- }
- /* Set default window size and icon */
- --- 2259,2266 ----
- scr++);
-
- XGeometry(DISP, scr, icon_geometry, "", 0, 0, 0, 0, 0,
- ! (int *) &temp_args1[0].value,
- ! (int *) &temp_args1[1].value, &junk, &junk);
- XtSetValues(top_level, temp_args1, XtNumber(temp_args1));
- }
- /* Set default window size and icon */
- ***************
- *** 2251,2258 ****
- screen_w = WidthOfScreen(SCRN) - 2*bwidth;
- screen_h = HeightOfScreen(SCRN) - 2*bwidth;
- #ifdef BUTTONS
- ! temp_args3[0].value = (XtArgVal) (page_w + 100 < screen_w ?
- ! page_w + 100 : screen_w);
- #else BUTTONS
- temp_args3[0].value = (XtArgVal) (page_w<screen_w ? page_w : screen_w);
- #endif BUTTONS
- --- 2268,2275 ----
- screen_w = WidthOfScreen(SCRN) - 2*bwidth;
- screen_h = HeightOfScreen(SCRN) - 2*bwidth;
- #ifdef BUTTONS
- ! temp_args3[0].value = (XtArgVal) (page_w + XTRA_WID < screen_w ?
- ! page_w + XTRA_WID : screen_w);
- #else BUTTONS
- temp_args3[0].value = (XtArgVal) (page_w<screen_w ? page_w : screen_w);
- #endif BUTTONS
- ***************
- *** 2266,2272 ****
- form_widget = XtCreateManagedWidget("form", formWidgetClass,
- top_level, form_args, XtNumber(form_args));
-
- ! vport_args[0].value = temp_args3[0].value - 79;
- vport_args[1].value = temp_args3[1].value;
- vport_widget = XtCreateManagedWidget("vport", viewportWidgetClass,
- form_widget, vport_args, XtNumber(vport_args));
- --- 2283,2289 ----
- form_widget = XtCreateManagedWidget("form", formWidgetClass,
- top_level, form_args, XtNumber(form_args));
-
- ! vport_args[0].value = temp_args3[0].value - XTRA_WID;
- vport_args[1].value = temp_args3[1].value;
- vport_widget = XtCreateManagedWidget("vport", viewportWidgetClass,
- form_widget, vport_args, XtNumber(vport_args));
- ***************
- *** 2274,2283 ****
- line_args[0].value = (XtArgVal) high_color ? hl_Pixel : fore_Pixel;
- line_args[2].value = temp_args3[1].value;
- line_args[3].value = (XtArgVal) vport_widget;
- ! strut_args[0].value = (XtArgVal) XtCreateManagedWidget("line",
- widgetClass, form_widget, line_args, XtNumber(line_args));
- ! (void) XtCreateManagedWidget("strut", widgetClass, form_widget,
- ! strut_args, XtNumber(strut_args));
-
- command_args[2].value = (XtArgVal) vport_widget;
- {
- --- 2291,2301 ----
- line_args[0].value = (XtArgVal) high_color ? hl_Pixel : fore_Pixel;
- line_args[2].value = temp_args3[1].value;
- line_args[3].value = (XtArgVal) vport_widget;
- ! right_args[0].value = (XtArgVal) XtCreateManagedWidget("line",
- widgetClass, form_widget, line_args, XtNumber(line_args));
- ! right_args[2].value = temp_args3[1].value;
- ! right_widget = XtCreateManagedWidget("right", compositeWidgetClass,
- ! form_widget, right_args, XtNumber(right_args));
-
- command_args[2].value = (XtArgVal) vport_widget;
- {
- ***************
- *** 2284,2293 ****
- int i;
- for (i = 0; i < XtNumber(command_table); ++i) {
- command_args[0].value = (XtArgVal) command_table[i].label;
- ! command_args[1].value = (XtArgVal) command_table[i].y_pos;
- command_call[0].closure = (caddr_t) command_table[i].closure;
- ! command_wid[i] = XtCreateManagedWidget(command_table[i].name,
- ! commandWidgetClass, form_widget,
- command_args, XtNumber(command_args));
- }
- }
- --- 2302,2311 ----
- int i;
- for (i = 0; i < XtNumber(command_table); ++i) {
- command_args[0].value = (XtArgVal) command_table[i].label;
- ! command_args[2].value = (XtArgVal) command_table[i].y_pos;
- command_call[0].closure = (caddr_t) command_table[i].closure;
- ! (void) XtCreateManagedWidget(command_table[i].name,
- ! commandWidgetClass, right_widget,
- command_args, XtNumber(command_args));
- }
- }
- ***************
- *** 2296,2302 ****
- top_level, vport_args, XtNumber(vport_args));
- #endif BUTTONS
- clip_widget = XtNameToWidget(vport_widget, "clip");
- ! set_draw_args();
- draw_widget = XtCreateManagedWidget("drawing", widgetClass,
- vport_widget, draw_args, XtNumber(draw_args));
- if (fore_color) XtSetValues(draw_widget, &fore_args, 1);
- --- 2314,2321 ----
- top_level, vport_args, XtNumber(vport_args));
- #endif BUTTONS
- clip_widget = XtNameToWidget(vport_widget, "clip");
- ! draw_args[0].value = (XtArgVal) page_w;
- ! draw_args[1].value = (XtArgVal) page_h;
- draw_widget = XtCreateManagedWidget("drawing", widgetClass,
- vport_widget, draw_args, XtNumber(draw_args));
- if (fore_color) XtSetValues(draw_widget, &fore_args, 1);
- ***************
- *** 2364,2370 ****
- XSetStandardProperties(DISP, top_level, dvi_name, prog, NULL,
- argv, argc, &size_hints);
-
- ! wmhints.flags = StateHint | IconPixmapHint;
- wmhints.initial_state = iconic ? IconicState : NormalState;
- wmhints.icon_pixmap = XCreateBitmapFromData(DISP,
- RootWindowOfScreen(SCRN),
- --- 2383,2390 ----
- XSetStandardProperties(DISP, top_level, dvi_name, prog, NULL,
- argv, argc, &size_hints);
-
- ! wmhints.flags = InputHint | StateHint | IconPixmapHint;
- ! wmhints.input = True; /* window manager must direct input */
- wmhints.initial_state = iconic ? IconicState : NormalState;
- wmhints.icon_pixmap = XCreateBitmapFromData(DISP,
- RootWindowOfScreen(SCRN),
- diff -cr old/xdvi.h new/xdvi.h
- *** old/xdvi.h Sun Mar 25 21:21:57 1990
- --- new/xdvi.h Fri Mar 16 21:32:05 1990
- ***************
- *** 9,16 ****
- #include <sys/types.h> /* for sites without X11 */
- #ifdef SYSV
- #include <string.h>
- ! #define index strchr
- ! #define rindex strrchr
- #include <fcntl.h>
- #else /* SYSV */
- #include <strings.h>
- --- 9,16 ----
- #include <sys/types.h> /* for sites without X11 */
- #ifdef SYSV
- #include <string.h>
- ! #define index strchr
- ! #define rindex strrchr
- #include <fcntl.h>
- #else /* SYSV */
- #include <strings.h>
- ***************
- *** 18,26 ****
- --- 18,39 ----
- #include <sys/file.h>
- #endif X10
-
- + #ifdef VMS
- + #include <string.h>
- + #define index strchr
- + #define rindex strrchr
- + #define bzero(a, b) (void) memset ((void *) (a), 0, (size_t) (b))
- + #endif
- +
- #include <setjmp.h>
-
- + #ifndef OPEN_MODE
- + #ifndef VMS
- #define OPEN_MODE "r"
- + #else VMS
- + #define OPEN_MODE "r", "ctx=stm"
- + #endif VMS
- + #endif OPEN_MODE
-
- #define Printf (void) printf
- #define Fprintf (void) fprintf
- ***************
- *** 46,56 ****
-
- #define MAXDIM 32767
-
- ! #define pixel_conv(x) ((int) (((x) / shrink_factor) >> 16))
- ! #define pixel_round(x) ((int) (((x) / shrink_factor + (1<<15)) >> 16))
- #define spellfour(f) ((long) (sfour(f) * fraction))
- #define spellnum(f,n) ((long) (snum(f,n) * fraction))
- - #define pxl2spell(x) (((long) (x)) * shrink_factor << 16)
-
- #ifdef X10
- #undef MSBITFIRST
- --- 59,75 ----
-
- #define MAXDIM 32767
-
- ! /*
- ! * pixel_conv is currently used only for converting absolute positions
- ! * to pixel values; although normally it should be
- ! * ((int) ((x) / shrink_factor + (1 << 15) >> 16)),
- ! * the rounding is achieved instead by moving the constant 1 << 15 to
- ! * PAGE_OFFSET in dvi_draw.c.
- ! */
- ! #define pixel_conv(x) ((int) ((x) / shrink_factor >> 16))
- ! #define pixel_round(x) ((int) ROUNDUP(x, shrink_factor << 16))
- #define spellfour(f) ((long) (sfour(f) * fraction))
- #define spellnum(f,n) ((long) (snum(f,n) * fraction))
-
- #ifdef X10
- #undef MSBITFIRST
- ***************
- *** 58,68 ****
- #define BMSHORT
- #endif X10
-
- ! #ifdef SYSV
- ! #define ANSI_LIB
- ! #else
- #define HAS_SIGIO /* has SIGIO on _sockets_ */
- #endif
-
- #ifdef BMLONG
- #define BMUNIT unsigned long
- --- 77,87 ----
- #define BMSHORT
- #endif X10
-
- ! #ifndef SYSV
- ! #ifndef VMS
- #define HAS_SIGIO /* has SIGIO on _sockets_ */
- #endif
- + #endif
-
- #ifdef BMLONG
- #define BMUNIT unsigned long
- ***************
- *** 91,114 ****
- };
-
- extern struct frame *stack;
- ! extern int stackp;
-
- /* entries below with the characters 'dvi' in them are actually stored in
- scaled pixel units */
-
- ! #define DVI_H stack[stackp].dvi_h
- ! #define PXL_H pixel_conv(stack[stackp].dvi_h)
- ! #define DVI_V stack[stackp].dvi_v
- ! #define PXL_V stack[stackp].pxl_v
- ! #define WW stack[stackp].w
- ! #define XX stack[stackp].x
- ! #define YY stack[stackp].y
- ! #define ZZ stack[stackp].z
- #define ROUNDUP(x,y) (((x)+(y)-1)/(y))
-
- - #define PAPER_WIDTH ROUNDUP(unshrunk_page_w, shrink_factor)
- - #define PAPER_HEIGHT ROUNDUP(unshrunk_page_h, shrink_factor)
- -
- extern int current_page;
- extern int total_pages;
- extern double fraction;
- --- 110,130 ----
- };
-
- extern struct frame *stack;
- ! extern struct frame *stackp;
-
- /* entries below with the characters 'dvi' in them are actually stored in
- scaled pixel units */
-
- ! #define DVI_H stackp->dvi_h
- ! #define PXL_H pixel_conv(stackp->dvi_h)
- ! #define DVI_V stackp->dvi_v
- ! #define PXL_V stackp->pxl_v
- ! #define WW stackp->w
- ! #define XX stackp->x
- ! #define YY stackp->y
- ! #define ZZ stackp->z
- #define ROUNDUP(x,y) (((x)+(y)-1)/(y))
-
- extern int current_page;
- extern int total_pages;
- extern double fraction;
- ***************
- *** 210,215 ****
- --- 226,232 ----
- extern Boolean list_fonts;
-
- extern int pixels_per_inch;
- + extern int unshrunk_paper_w, unshrunk_paper_h;
- extern int unshrunk_page_w, unshrunk_page_h;
- extern int density;
-
- ***************
- *** 225,230 ****
- --- 242,248 ----
- int min_x, max_x, min_y, max_y; /* for pending expose events */
- } mane, alt, curr;
-
- + #define WINDOW(wr) ((Window) (wr).win)
- #define shrink_factor curr.shrinkfactor
-
- jmp_buf dvi_env; /* mechanism to communicate dvi file errors */
-
- dan
- -----------------------------------------------------------
- O'Reilly && Associates
- argv@sun.com / argv@ora.com
- 632 Petaluma Ave, Sebastopol, CA 95472
- 800-338-NUTS, in CA: 800-533-NUTS, FAX 707-829-0104
- Opinions expressed reflect those of the author only.
-